Validators (Spell Checking Before Saving)

It maybe desirable to have the spell checker check the contents of text boxes on the form for errors before proceeding. RapidSpellWebLauncher and RapidSpellWInline can act as Validator controls, in a manner very similar to the standard ASP.NET validators. When they are enabled as validators (by setting the Validator property to true) they will warn the user about any errors and demand that spell checking is at least performed. The user can leave spelling 'errors' in the text box (because some words, such as names, are not known by the spell checker, but are valid), but they must at least run the spell check if there are errors.

Set the AutoLaunchWhenTextInvalid property to true to have the spell check run automatically after the page posts back - note AutoLaunchWhenTextInvalid may not work with RapidSpellWebLauncher if popup blockers are being used in the visitors browser, since most popup blockers will block any popups that they cannot determine were caused by the user directly - RapidSpellWInline doesn't use popups and doesn't suffer from this.

Code Example

<form id="Form1" method="post" runat="server">
    <asp:textbox id="TextBox1" style="Z-INDEX: 100; LEFT: 123px; POSITION:
absolute; TOP: 115px" runat="server" Font-Size="11pt" Font-
Names="Tahoma,Verdana,Arial" Width="624px" Height="270px"
TextMode="MultiLine">This demonstratess how to use RapidSpellWInline as a
validator.</asp:textbox>

    <asp:button id="Button1" style="Z-INDEX: 103; LEFT: 579px; POSITION:
absolute; TOP: 401px" runat="server"
            Text="Save"></asp:button>

    <asp:validationsummary id="ValidationSummary1" style="Z-INDEX: 104; LEFT:
101px; POSITION: absolute; TOP: 458px" runat="server" Font-Size="9pt" Font-
Names="Arial"></asp:validationsummary>

    <RAPIDSPELLWEB:RAPIDSPELLWINLINE id="RapidSpellWInline1" style="Z-INDEX:
105; LEFT: 637px; POSITION: absolute; TOP: 401px" runat="server"
ButtonTextSpellMode="Edit" AutoLaunchWhenTextInvalid="True"
RapidSpellWInlineHelperPage="../rswihelper.aspx" TextComponentID="TextBox1"
Validator="True"></RAPIDSPELLWEB:RAPIDSPELLWINLINE>

</form>

In this example the user is queried to run a spell check if there are spelling errors in the box when the form is submitted.